package com.cloudkinto.service.order.outbound;

import com.cloudkinto.bo.order.allocate.AllocatePlanQueryBo;
import com.cloudkinto.bo.order.outbound.ImportNormalOutboundExpressBo;
import com.cloudkinto.bo.order.outbound.NormalOrderOutboundQueryBo;
import com.cloudkinto.bo.order.outbound.PrintExpressSheetBo;
import com.cloudkinto.bo.order.outbound.TransferOrderOutboundQueryBo;
import com.cloudkinto.common.exception.BizException;
import com.cloudkinto.dto.order.outbound.UpdateTrackingNoImportWmsDto;
import com.cloudkinto.vo.common.CommonBatchOperationVo;
import com.itextpdf.text.DocumentException;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 出库单导入导出打印 service接口
 * </p>
 *
 * @author long
 * @since 2024-12-30
 */
public interface OutboundImportExportService {

    void printNormalShippingList(Long id, HttpServletResponse response) throws IOException;

    void printExpressSheet(PrintExpressSheetBo bo, HttpServletResponse response) throws Exception;

    void printTransferShippingList(Long id, HttpServletResponse response) throws IOException;

    void printTransferPickingList(Long id, HttpServletResponse response) throws IOException;

    void printTransferPickingListBatch(List<Long> ids, HttpServletResponse response) throws Exception;

    CommonBatchOperationVo importUpdateTrackingNumber(MultipartFile file, Long tenantId, Long userId, String username, Long whId);

    CommonBatchOperationVo importUpdateTrackingNumberApi(List<UpdateTrackingNoImportWmsDto> importDtoList, int orderType, Long tenantId, Long userId, String username, Long whId);

    CommonBatchOperationVo dealImportUpdateTrackingNumber(List<UpdateTrackingNoImportWmsDto> importDtoList, int orderType, Long tenantId, Long whId, Long userId, String username, String from);

    CommonBatchOperationVo importUpdatePackage(MultipartFile file, Long tenantId, Long userId, String username);

    ByteArrayOutputStream getDeliveryOrderExcelOutputStream(Long transferId);

    ByteArrayOutputStream getDeliveryOrderPdfOutputStream(Long transferId);

    /**
     * 每行表示一个出库单，多个产品时横向填写
     */
    void getNormalOutboundImportTemplate1(HttpServletResponse response, Long tenantId, Long companyId) throws IOException;

    /**
     * 多行表示一个出库单，多个产品时纵向填写
     */
    void getNormalOutboundImportTemplate2(HttpServletResponse response, Long tenantId, Long companyId) throws IOException;

    /**
     * 每行表示一个出库单，多个产品时横向填写
     */
    CommonBatchOperationVo importNormalOutbound1(MultipartFile file, Long tenantId, Long userId, String username, Long companyId);

    /**
     * 多行表示一个出库单，多个产品时纵向填写
     */
    CommonBatchOperationVo importNormalOutbound2(MultipartFile file, Long tenantId, Long userId, String username, Long companyId);

    CommonBatchOperationVo importNormalOutboundTrackingNumber(MultipartFile file, Long tenantId, Long userId, String username, Long companyId);

    CommonBatchOperationVo importNormalOutboundExpress(ImportNormalOutboundExpressBo bo, Long tenantId, Long userId, String username);

    void getWholesaleOutboundImportTemplate1(HttpServletResponse response, Long tenantId, Long companyId) throws IOException;

    void getWholesaleOutboundImportTemplate2(HttpServletResponse response, Long tenantId, Long companyId) throws IOException;

    CommonBatchOperationVo importFbaAllocateOutbound(MultipartFile file, Long tenantId, Long userId, String username, Long companyId);

    CommonBatchOperationVo import3rdWhAllocateOutbound(MultipartFile file, Long tenantId, Long userId, String username, Long companyId);

    CommonBatchOperationVo importTransferOutbound1(MultipartFile file, Long tenantId, Long userId, String username, Long companyId);

    CommonBatchOperationVo importTransferOutbound2(MultipartFile file, Long tenantId, Long userId, String username, Long companyId);

    void getFbaAllotOutboundImportTemplate(HttpServletResponse response, Long tenantId, Long companyId) throws IOException;

    void get3rdWhAllotOutboundImportTemplate(HttpServletResponse response, Long tenantId, Long companyId) throws IOException;

    void normalOutboundExportOms(NormalOrderOutboundQueryBo bo, Long companyId, HttpServletResponse response) throws IOException;

    void normalOutboundExportBySimple(NormalOrderOutboundQueryBo bo, HttpServletResponse response) throws IOException;

    void normalOutboundExportWmsOmp(NormalOrderOutboundQueryBo bo, Long whId, Long tenantId, HttpServletResponse response) throws IOException;

    void transferOutboundExportOms(TransferOrderOutboundQueryBo bo, Long companyId, HttpServletResponse response) throws IOException;

    void transferOutboundExportBySimple(TransferOrderOutboundQueryBo bo, HttpServletResponse response) throws IOException;

    void transferOutboundExportWmsOmp(TransferOrderOutboundQueryBo bo, Long whId, Long tenantId, HttpServletResponse response) throws IOException;

    void getImportUpdateTrackingNumberTemplate(HttpServletResponse response) throws IOException;

    void printAllocateShippingList(Long id, HttpServletResponse response) throws IOException;

    void printAllocatePickingList(Long id, HttpServletResponse response) throws Exception;

    void allocateExportByFba(AllocatePlanQueryBo bo, HttpServletResponse response) throws IOException;

    void allocateExportBy3rdWh(AllocatePlanQueryBo bo, HttpServletResponse response) throws IOException;

    void getDeliveryOrderZip(Long transferId, HttpServletResponse response) throws IOException;

    void getDeliveryOrderBatch(List<Long> ids, HttpServletResponse response) throws IOException;
}
